<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
// echo "开始尝试连接数据库<br>";
$conn = new mysqli('localhost', 'root', '874604', 'root');

if ($conn->connect_error) {
    die("数据库连接失败: " . $conn->connect_error);
}

// echo "数据库连接成功";

$conn->set_charset("utf8mb4");